from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
import sys
sys.path.append(r'..')
from web_base.base_page import BasePage

class LocalPage(BasePage):
    url=r'/bsams/front/asset_provider/asset_provider_list.do'
    # 查询定位
    add_ben_loc = (By.XPATH, '//*[@id="leftmenu_asset_storage"]/div[2]/a')
    add_status_loc = (By.ID, 'status')
    add_title_loc = (By.ID, 'title')
    add_ok_loc = (By.CLASS_NAME, 'search_button')

    def local_search(self, text1, status):
        self.open()
        self.ele_click(self.add_ben_loc)
        sleep(2)
        self.ele_select(self.add_status_loc, status)
        self.ele_input(self.add_title_loc, text1)
        sleep(2)
        self.ele_click(self.add_ok_loc)
        sleep(2)

